package cn.glow.readingcloud.homepage.config;


import org.apache.http.HttpHost;
import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestHighLevelClient;
import org.springframework.context.annotation.Configuration;

/**
 * @Author Glow
 * @Date 2023-04-23 15:24:28
 * @Description ES配置
 * @Version 1.0
 */
@Configuration
public class ElasticSearchConfig {

    public RestHighLevelClient restHighLevelClient(){
        return  new RestHighLevelClient(
                RestClient.builder(new HttpHost("127.0.0.1",9200,"http"))
        );
    }
}
